import { request } from '@/utils/request';

// 手动定义模拟数据
const mockData = {
  list: [
    { id: 1, name: '张三', age: 25, email: 'zhangsan@example.com' },
    { id: 2, name: '李四', age: 30, email: 'lisi@example.com' },
    { id: 3, name: '王五', age: 35, email: 'wangwu@example.com' },
    { id: 4, name: '赵六', age: 40, email: 'zhaoliu@example.com' },
    { id: 5, name: '孙七', age: 45, email: 'sunqi@example.com' },
    { id: 6, name: '周八', age: 50, email: 'zhouba@example.com' },
    { id: 7, name: '郑九', age: 55, email: 'zhengjiu@example.com' },
    { id: 8, name: '钱十', age: 60, email: 'qian Shi@example.com' },
    { id: 9, name: '吴十一', age: 65, email: 'wushiyi@example.com' },
    { id: 10, name: '郑十二', age: 70, email: 'zhengshizhi@example.com' }
  ]
};

export function getList(data) {
  return request.post({
    url: '/student/list',
    data
  });
}

export function update(data) {
  return request.post({
    url: '/student/modify',
    data
  });
}

export function save(data) {
  return request.post({
    url: '/student/create',
    data
  });
}

export function delFunc(data) {
  return request.post({
    url: '/stduent/remove',
    data
  });
}

export function exportFunc(params) {
  return request.get({
    url: '/student/export',
    params
  })
}
